package com.yanqu.road.entity.activity.springunionbanquet;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Objects;

@FieldTypeAnnotation(tableName = "t_c_spring_union_banquet_user")
public class SpringUnionBanquetUserData extends DataObject {

    @FieldTypeAnnotation(select = true, update = true, desc = "活动id")
    private int activityId;

    @FieldTypeAnnotation(update = true, desc = "玩家id")
    private long userId;

    @FieldTypeAnnotation(desc = "当前商会")
    private String unionUid = "";

    @FieldTypeAnnotation(desc = "开宴次数")
    private int openNum;

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if(this.activityId != activityId) {
            this.activityId = activityId;
            setUpdateOption();
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public String getUnionUid() {
        return unionUid;
    }

    public void setUnionUid(String unionUid) {
        if(!Objects.equals(this.unionUid, unionUid)) {
            this.unionUid = unionUid;
            setUpdateOption();
        }
    }

    public int getOpenNum() {
        return openNum;
    }

    public void setOpenNum(int openNum) {
        if(this.openNum != openNum) {
            this.openNum = openNum;
            setUpdateOption();
        }
    }
}
